package com.jwork.progress.service.ordermqservice;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * Notes 订单超时取消
 * Author smiler
 * Date 2025/06/20 20:26
 */
@Component
@RocketMQMessageListener(
        topic = "order_timeout_topic",
        consumerGroup = "order_producer_group"
)
public class OrderCancelConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String orderId) {
        // 1. 查询订单状态

        // 2. 超时未支付订单取消
        System.out.println("超时未支付订单：" + orderId + "执行取消");
    }
}
